<?php

/**
 * 开发商入口
 * @author haohh
 * @date 2017/03/19
 */

include_once('./common.php');
include_once(S_ROOT.'./function/html.func.php');
include_once(S_ROOT.'./function/admin.func.php');
include_once(S_ROOT.'./function/cache.func.php');

@include_once(S_ROOT.'./function/register.func.php');
@define('IN_SUPESITE_ADMINCP', TRUE);
define('IMG_DIR', S_URL.'/admin/images');
define('CPURL', S_URL.'/admincp.php');

session_start();

$action = empty($_GET['action'])?'':$_GET['action'];

$login_count = $_SESSION['Devlogin_count'];
$add = 1;

$cookietime = 0;
if(!empty($_POST['cookietime'])) $cookietime = intval($_POST['cookietime']);

////////////////////////////////////////////////////////////////////////

//语言包
include_once(S_ROOT.'./language/admincp.lang.php');

//记录log
@$fp = fopen(S_ROOT.'./log/public.log.php', 'a');
@flock($fp, 2);
@fwrite($fp, "<?exit?>$_SGLOBAL[timestamp]\t$_SGLOBAL[dev_username]\t$_SGLOBAL[onlineip]\t".$_SERVER['QUERY_STRING']."\n");
@fclose($fp);
// 默认module
if(empty($_GET['module'])){
	$_GET['module'] = 'sys';
}
// 默认action
if(empty($_GET['action'])){
	$_GET['action'] = 'index';
}
// 引入菜单文件
include_once S_ROOT.'./public/class/'.$_GET['module'].'/'.$_GET['action'].'.php';
?>